home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d19 / pcbucr24.arc / PCBUCR.DOC < prev    next >
Text File  |  1988-05-31  |  22KB  |  612 lines

  1.  
  2.          
  3.                       PCBOARD User Credit System Ver. 2.4
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.                       PCBOARD User Credit System Ver. 2.4
  17.  
  18.                                CopyWrite (c) 1988
  19.  
  20.                                 By David Cantere
  21.  
  22.                           (Sysop)  Technoids Anonymous
  23.  
  24.                                  (602) 899-4876
  25.  
  26.  
  27.  
  28.  
  29.  
  30.         Disclaimer:
  31.  
  32.              This program is being released into Public Domain.  I give 
  33.         no warranty of any kind.  But will do what I can to help if you 
  34.         have problems.  This program does access your users file and 
  35.         caller's log.  I would recommend that you backup both files 
  36.         before you run the program for the first time.
  37.  
  38.                The program is released as two separate files.
  39.             
  40.                PCBUCRxx.EXE -- Contains full self contained code.
  41.                PCBUxx.EXE   -- Full program but requires BRUN40.EXE.
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.                                    1
  63.          
  64.                       PCBOARD User Credit System Ver. 2.4
  65.  
  66.         What PCBUCR Does:
  67.  
  68.              PCBOARD User Credit System is a program designed to allow 
  69.         the sysop to give or remove both upload and download credits 
  70.         based on entries found in the callers log.  You tell the program 
  71.         what different strings to find in the callers log and it will 
  72.         accumulate totals for each user.  Using those totals you can give 
  73.         or remove both upload and download credits based on ratios 2 to 
  74.         1, 3 to 2, 4 to 3......etc.  You can tell the program only give 
  75.         credit if d/l exceeds u/l and more.  
  76.  
  77.  
  78.         How PCBUCR Works:
  79.  
  80.              The program reads the callers log and stores each login name 
  81.         plus totals for each search string you have entered.  Every time 
  82.         it finds a user who has one of the search strings you've entered 
  83.         in the log it stores the users name and a value one (1) to 
  84.         PCBUCR.FIL.  Upon completion the program  then sorts the file by 
  85.         user name and totals up each user.  Thus ending up with a user's 
  86.         name and how many times one of your search strings was found in 
  87.         the callers log.  Individual total's are stored for each search 
  88.         string in the .DAT file.  At this point the users file is updated 
  89.         using the ratio you entered.  But only if you have the switch 
  90.         turned on in the PCBUCR.DAT file.  Anything left over will be 
  91.         saved in the PCBUCR.FIL file and merged in with the results from 
  92.         the next run.
  93.  
  94.              After each successful run the program will store the last 
  95.         log entry it found to a file called PCBUCRx.CFG.  Each time you 
  96.         run the program it will search backwards for the last entry 
  97.         stored in this file and start counting from there.  This way the 
  98.         program can run each night in the event timer and take a minute 
  99.         or so to run and store totals (Update the USERS file at the same 
  100.         time as well).  This also prevents a string in the ".dat" file 
  101.         from being counted more than once thus giving a user more credits 
  102.         than he/she has earned.
  103.  
  104.             NOTE:  Even if you are running under a single node 
  105.                    environment the program will still use numbers when 
  106.                    creating the 'PCBUCRx.cfg' files. 
  107.  
  108.  
  109.              If a user is note found in the users file then all credits 
  110.         for that users will be removed from 'PCBUCR.fil'.  This way 
  111.         partial totals for a user who has been removed from the users 
  112.         file (for what ever reason) will note accumulate and waste space.
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.                                    2
  124.          
  125.                       PCBOARD User Credit System Ver. 2.4
  126.  
  127.         Command Line Switch(s):
  128.  
  129.              (UPDATE) If you have Auto update turned off in the               
  130.                       PCBUCR.DAT file.  You can use the UPDATE switch to               
  131.                       run a direct update bypassing everything else.  
  132.                       This switch will work regardless of the setting of 
  133.                       the AUTO UPDATE switch in the .DAT file so it can 
  134.                       be manually run at any time.  I recommend to run 
  135.                       with auto update turned off and do it manually the 
  136.                       first few times to make sure everything works 
  137.                       properly.  As always when running a new release of 
  138.                       a program you should make a backup before running 
  139.                       it for the first time.
  140.  
  141.               Format  C>PCBUCR UPDATE
  142.  
  143.  
  144.             (PURGE)   This works the same as (UPDATE) with one exception.  
  145.                       When performing updates all users are searched for 
  146.                       even if they don't have enough credits stored for 
  147.                       the search string entered.  This allows you to 
  148.                       clean up the .DAT file and remove users who don't 
  149.                       exist in the users file but don't have enough 
  150.                       credits stored for PCBUCR to search for them.  This 
  151.                       only occurs when a ration of 2 to 1 or higher is 
  152.                       used.  You shouldn't need to run this to often but 
  153.                       I recommend you use it right after you do a pack on 
  154.                       the users file and remove old or deleted users.
  155.  
  156.               Format  C>PCBUCR PURGE
  157.  
  158.  
  159.  
  160.         Installing PCBUCR:
  161.  
  162.              For the most part the program is not that hard to setup.  
  163.         But to let you know it does create and maintain several files of 
  164.         its own.  PCBUCR.FIL, PCBUCRx.CFG, PCBUCR.LOG and PCBUCR.DAT.  
  165.  
  166.  
  167.         PCBUCR.FIL:
  168.  
  169.              The first PCBUCR.FIL maintains an accumulation of totals 
  170.         based on the search strings you have entered in the .DAT file.
  171.         There is a separate total for each search string entered and each 
  172.         one has its own ratio to use while performing an update on the 
  173.         user.  
  174.  
  175.  
  176.         PCBUCRx.CFG:
  177.  
  178.               PCBUCRx.CFG contains the last stored log entry found in the 
  179.         caller's log the last time the program ran.  There can be more 
  180.         than one of this file each one substituting a number in place of 
  181.         the letter (x).  This number is determined by it's 
  182.  
  183.  
  184.                                    3
  185.          
  186.                       PCBOARD User Credit System Ver. 2.4
  187.  
  188.         position in the ".DAT" file.  This allows the program to keep 
  189.         track of each callers log separately so you don't have to play 
  190.         around with multiple .dat files in different directories or 
  191.         something like that.  
  192.  
  193.  
  194.         PCBUCR.LOG:       (optional)
  195.  
  196.              PCBUCR.LOG contains a log of what updates are performed each 
  197.         time the program run's in update mode.  This log is optional.  
  198.         You can turn it on or off in the .dat file.  You also have the 
  199.         option of specifying the name and location of the log file.  This 
  200.         file append's during each run so you can see what updates were 
  201.         performed on each user.  At the top is the name of the users file 
  202.         the date and the time the program started its update.  Each user 
  203.         that was updated is then listed with a detail list of numbers to 
  204.         tell you what was updated and by how much.  The first three 
  205.         numbers are credits accumulated, uploads and downloads before any 
  206.         update is performed.  The second three numbers are the results 
  207.         after the update.  Each column is formatted to hold numbers as 
  208.         high as '99,999'.  The last entry is the time at which the 
  209.         program ended its update operation.  You can then figure out just 
  210.         how long the program is taking to perform its updates each time 
  211.         you run it.
  212.  
  213.  
  214.  
  215.         Configuring PCBUCR.DAT:
  216.                     
  217.                          The following is a sample file!
  218.  
  219.  
  220.         Beginning Of File
  221.  
  222.           1 19 5000 256 1 25 146 2 148 2             
  223.           c:\p\main\CALLER
  224.           c:\p\main\users
  225.           Y
  226.           Y c:\pcb\main\pcbndx.
  227.           Y c:\pcb\gen\blt6       (defaults to PCBUCR.LOG)
  228.           5
  229.           2 1 2 AA
  230.           Message Left
  231.           1 1 1 BA
  232.           New - Adventure
  233.           1 1 1 CD
  234.           (D) TAFILES.ARC Completed
  235.           1 1 1 DA
  236.           * NEW USER *
  237.           1 1 1 EA
  238.           Questionnaire (1)
  239.  
  240.         END OF FILE
  241.  
  242.  
  243.  
  244.  
  245.                                    4
  246.          
  247.                       PCBOARD User Credit System Ver. 2.4
  248.  
  249.         Line #1)
  250.  
  251.              The first number is the number of callers log's you want to 
  252.         track.  You must have an equal number of entries starting on line 
  253.         2 that match this number or the program will not work correctly 
  254.         and could possible do major damage to your users file.  
  255.  
  256.              The second number is the offset position of the users name 
  257.         in the log string of the callers log.  As of release 12.1, 19 is 
  258.         used for single node systems and 22 for multi-node systems were 
  259.         the node number is included in the log string.  
  260.  
  261.              The third is the size of the sort buffer I've defaulted it 
  262.         at 5000 and that should more than handle the job.  But if you 
  263.         find it doesn't you can increase the number.  I haven't test on 
  264.         just how high you can go so your on your own if you play around 
  265.         with it.  
  266.  
  267.  
  268.              Be very careful changing the rest of these numbers.  They 
  269.         contains information on the location of the upload, download and 
  270.         length of your users file.
  271.  
  272.              The fourth number contains the record length of your users 
  273.         file.  5 & 6 are the starting Position and length of the users 
  274.         full name field.  7 & 8 contain the starting position and length 
  275.         of the users upload field and 9 & 10 contain the starting 
  276.         position and length of the users download field. These numbers 
  277.         will only need to be changed in the event the users file is 
  278.         modified witch will happen when PCBoard 14.0 is released.  I 
  279.         purposely placed these values outside of the program for easy 
  280.         modification when needed so PCBUCR could be modified for most 
  281.         future release of PCBOARD without worrying about updates.
  282.  
  283.  
  284.         Line #2) 
  285.  
  286.              Contains the name and location of your CALLERS log.  If you 
  287.         are tracking more than one (1) log.  Then line #3 gets pushed 
  288.         down (1) line for each callers log you have entered.  Make sure 
  289.         the number of logs you enter equal the first number on line #1.
  290.  
  291.            NOTE: If you add another node just increase the first 
  292.                  parameter by one and add it the the list.  A new ".cfg" 
  293.                  file will be created the first time you run it.
  294.  
  295.  
  296.         Line #3) 
  297.  
  298.              Contains the name and location of your USERS file.  Fully 
  299.         supports paths.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.                                    5
  307.          
  308.                       PCBOARD User Credit System Ver. 2.4
  309.  
  310.         Line #4) 
  311.  
  312.              Allows you the sysop to tell the system if you want it to 
  313.         automatically update the users file each time the program run's.  
  314.         If you select "Y" then each time the program runs it will go 
  315.         threw the USERS file and update each user's credit's by the ratio 
  316.         you entered for the string that generates the credit.  If "N" 
  317.         then the program will accumulate totals each day and store them.  
  318.         At this point the only way to update the users is to use the 
  319.         command line switch UPDATE.  (See command line switches)
  320.  
  321.  
  322.         Line #5)
  323.  
  324.              Tells PCBUCR if you want it to use pcboards quick index 
  325.         files.  If you elect to use this then it must be followed by the 
  326.         path location and the first half of the name of the index files.  
  327.         The PCBUCR will added the alphabetic character when opening the 
  328.         appropriate index file.  You need to add the "." separating the 
  329.         first half of the name from the .ext.  If you don't specify the 
  330.         index path and name PCBUCR will automatically scan the users file 
  331.         instead.  In the event PCBUCR finds a discrepancy in the index 
  332.         (i.e. the index doesn't match the record in the users file) if 
  333.         will perform a scan on the users file in an attempt to find the 
  334.         user.
  335.  
  336.  
  337.         Line #6) 
  338.  
  339.              IF set to 'Y', this switch tells the program to log each 
  340.         update run to the default file called 'PCBUCR.LOG'.  If you wish 
  341.         to use a different name then you can specify it on the same line.  
  342.         Full path's are supported.  Be sure you put at least one space 
  343.         between them.  
  344.  
  345.              The name of the users file plus the time and date of the run 
  346.         are entered at the beginning of each run followed by the users 
  347.         who are being updated.  Each update line contains the users name, 
  348.         search string i.d., type of update to perform followed by 6 
  349.         columns of numbers.  The first 3 numbers are 1) the number of 
  350.         credits accumulate for the search string.  2) the users current 
  351.         upload value and 3) the users download value.  Number's 4,5 & 6 
  352.         are the same numbers but after being updated.  IF this switch is 
  353.         set to 'N' then this log is not created or updated during the 
  354.         running of the program.
  355.  
  356.  
  357.         Line #7) 
  358.  
  359.              This value indicates the number of strings to be searched 
  360.         for.  It should be equal to the number of items you want the 
  361.         system to look for and accumulate totals for while reading your 
  362.         callers log.  The remaining lines contain the search strings and 
  363.         what to do with them.
  364.  
  365.  
  366.  
  367.                                    6
  368.          
  369.                       PCBOARD User Credit System Ver. 2.4
  370.  
  371.         Search Strings
  372.  
  373.              Each search string will occupy two lines.  One for the 
  374.         parameters to follow for the search string totals and the other 
  375.         is the search string itself.
  376.  
  377.              The first line contains 3 sets of numbers and 2 letters.  
  378.         The first to numbers are the ratio to use when giving credit to a 
  379.         user.  The first number of the ration is how many credits the user 
  380.         must accumulate before giving he/she the proper credits.  Those 
  381.         credits given is the contence of the second number.  So if you 
  382.         enter a ratio of 3 2.  This means that for every 3 credits the 
  383.         user has accumulate for that search string he/she gets 2 upload 
  384.         or download credits added to or sub-tracted from he/she's current 
  385.         total's in the users file.  You can use any ratio that fits your 
  386.         needs, 5 TO 3, 3 TO 5, 3 TO 1, 13 TO 3....etc.  It should work 
  387.         with any combination.  Just be sure to separate the 2 numbers by 
  388.         at least one space for proper operation of the program.  Also 
  389.         when removing upload or download credits the system checks to 
  390.         make sure the current value's in the users records DO NOT FALL 
  391.         below ZERO.
  392.  
  393.              The 3rd number on the line has 3 possible affects to the 
  394.         way user credits are given.
  395.  
  396.              1) Always update the users upload or download credit as
  397.                 long as he/she has earned enough credits for it.
  398.  
  399.              2) Same as one but will only update as long as uploads DO 
  400.                 NOT exceed downloads or until they do.  Any remaining
  401.                 credits are stored for later use.  This allow you to
  402.                 accumulate credits for user's and the system will use
  403.                 those credits when the user need's them.
  404.  
  405.              3) Same as two but does not accumulate totals and store them         
  406.                 for later use.  Instead they are thrown away or deleted.
  407.  
  408.              The 5th position contains a 2 letter code.  They must be 
  409.         upper case and they must be together.  Not Spaces between them.  
  410.         These two letters are used together for grouping totals and also 
  411.         to tell the program what type of credit the user is to get or 
  412.         lose.
  413.              The first letter can be of your choosing using the letter 
  414.         (A-Z).  I use one letter for each search string and keep it in 
  415.         alphabetical order.  But order should make no difference also I 
  416.         see no problem with using the same letter on 1 or more groupings.  
  417.         They will just be totaled together as one and the program wont 
  418.         have to maintain two separate totals.
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.                                    7
  429.          
  430.                       PCBOARD User Credit System Ver. 2.4
  431.  
  432.              The second position can have one of four choices (A,B,C or 
  433.         D).  These letters are used to tell the program what type of 
  434.         credit to give or take away.
  435.  
  436.                 A = Give Upload credit for this search string
  437.                 B = Remove upload credit for this search string
  438.                 C = Give download credit for this search string
  439.                 D = Remove download credit for this search string
  440.  
  441.             B & D will not allow the upload or download credit to fall 
  442.         below zero.  Also Be sure it's in upper case.
  443.  
  444.              The second line contains your text string for the program to 
  445.         search for.  Your search strings can contain punctuation marks or 
  446.         anything else you want but it is limited to 62 characters (the 
  447.         record size of the caller log records minus the charage return 
  448.         and line feed's on the end).  In order for it to work you must 
  449.         make your entries exactly as in the callers log.  This includes 
  450.         upper and lower case spaces everything.  But do remember you only 
  451.         need enough of the line to make it unique to other strings that 
  452.         could be places in the log.  The search used is an in-string 
  453.         search so matches don't have to be exact but, your search string 
  454.         must be contained with in the log entry for a match to occur.
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.                                    8
  490.          
  491.                       PCBOARD User Credit System Ver. 2.4
  492.  
  493.         REVISION HISTORY:
  494.  
  495.         07-08-1987  Official release of version 1.0
  496.  
  497.         10-30-1987  Release (BETA 2.0)
  498.            
  499.            * Modified to support 12.0 callers logs
  500.  
  501.         02-08-1988  Release 2.1
  502.  
  503.            * Modified To support 12.1 Callers logs
  504.  
  505.            * Now supports multiple caller log's.  You can read and track 
  506.              more than 1 callers log.  It should be able to handle 1 to 
  507.              99 log's at a time.  Probably more.
  508.  
  509.            * Documentation updated for 12.1 release.
  510.  
  511.         03-17-1988  Release 2.2
  512.  
  513.            * Changed PCBUCR.DAT file and PCBUCR.FIL.  You will have to 
  514.              delete your PCBUCR.FIL file as the new format wont work with 
  515.              the data currently stored.
  516.  
  517.            * Now individual control over each search string.  Separate      
  518.              ratios and individual totals of each string.
  519.  
  520.            * The ability to give or take away upload and download 
  521.              credits.
  522.  
  523.            * Stores results of last update (only) for later viewing or 
  524.              verification of proper updates.  To a file caller 
  525.              PCBUCR.LOG.  This file was created mainly for debug 
  526.              purposes.
  527.  
  528.  
  529.         05-01-1988  Release 2.3    (never released)
  530.  
  531.            * Formatted Columns for output of UPDATE function to screen 
  532.              and to log file.  Number fields are format to support 
  533.              numbers as high as '99,999'.
  534.  
  535.            * Log output will now append each time the programs runs       
  536.              instead of overwriting each time.
  537.  
  538.            * Log format has been cleaned up and is report slightly       
  539.              differently from that output to the screen.  The data       
  540.              displayed is the same.
  541.  
  542.            * Documentation has been re-written and is formatted for most       
  543.              standard printers.
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.                                    9
  551.          
  552.                       PCBOARD User Credit System Ver. 2.4
  553.  
  554.         05-16-88   Release 2.4
  555.  
  556.            * Added support for pcboard quick index files
  557.  
  558.            * Added the ability to set the name of the output log provided 
  559.              the log switch is turned on.
  560.  
  561.            * Cleaned up internal update loops to prevent uploads from 
  562.              exceeding downloads when you have activated the switch only 
  563.              update if uploads do not exceed downloads.
  564.  
  565.            * Added Purge option on command line switches to clean out the 
  566.              .FIL file when ration of 2 to 1 or greater is used.
  567.  
  568.            * Made a few changes in the .DAT file.  DO NOT run this 
  569.              release with .DAT file's used in version prior to 2.4.
  570.  
  571.  
  572.         Features To Add!:
  573.  
  574.              Max and Min security levels to store and accumulate totals for.
  575.  
  576.              Give me some feed back and some ideas to add to the program.
  577.  
  578.  
  579.              I've tested the program with the sample file and a few 
  580.         variation.  I don't think i've missed anything but if you find 
  581.         something please let me know.
  582.  
  583.  
  584.                               Sysop Technoids Anonymous
  585.  
  586.                                    David Cantere
  587.  
  588.                                   (602) 899-4876
  589.  
  590.  
  591.                 Mailing address:
  592.  
  593.                           David Cantere
  594.                           P.O. Box 1464
  595.                           Chandler, Az 85244-1464
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.                                    10
  612.